home *** CD-ROM | disk | FTP | other *** search
- on SetDcRollAuto
- global listRollAuto
- if (listRollAuto = list()) or voidp(listRollAuto) then
- set listRollAuto to list()
- exit
- end if
- FalsePisteTest(getAt(listRollAuto, 1))
- set listRollAuto to list()
- end
-
- on InitRollAuto SprRollAuto, Champs, operande
- global listRollAuto
- if (paramCount() <> 3) or (listRollAuto = list()) then
- set listRollAuto to list(0, 0)
- end if
- setAt(listRollAuto, 1, SprRollAuto)
- set Pz to 1
- repeat with AccuA = 1 to the number of words in Champs / 3
- set NumSpr to value(word Pz of Champs)
- add(listRollAuto, the left of sprite NumSpr)
- add(listRollAuto, the right of sprite NumSpr)
- add(listRollAuto, the top of sprite NumSpr)
- add(listRollAuto, the bottom of sprite NumSpr)
- add(listRollAuto, the locH of sprite NumSpr)
- add(listRollAuto, the locV of sprite NumSpr)
- add(listRollAuto, the number of cast word Pz + 1 of Champs)
- add(listRollAuto, the number of cast word Pz + 2 of Champs)
- set Pz to Pz + 3
- end repeat
- setAt(listRollAuto, 2, (count(listRollAuto) - 2) / 8)
- puppetSprite(SprRollAuto, 1)
- BalayRollAuto()
- end
-
- on AjouteRollAuto SprRollAuto, Champs
- InitRollAuto(SprRollAuto, Champs, 1)
- end
-
- on BalayRollAuto
- global listRollAuto, DcCursMain, CastEfface
- if listRollAuto = [] then
- exit
- end if
- set AccuX to the mouseH
- set AccuY to the mouseV
- set SprRollAuto to getAt(listRollAuto, 1)
- set Pz to 3
- repeat with Compteur = 1 to getAt(listRollAuto, 2)
- if getAt(listRollAuto, Pz) < AccuX then
- if getAt(listRollAuto, Pz + 1) > AccuX then
- if getAt(listRollAuto, Pz + 2) < AccuY then
- if getAt(listRollAuto, Pz + 3) > AccuY then
- set the castNum of sprite SprRollAuto to getAt(listRollAuto, Pz + 6)
- set the locH of sprite SprRollAuto to getAt(listRollAuto, Pz + 4)
- set the locV of sprite SprRollAuto to getAt(listRollAuto, Pz + 5)
- SetAffTxtRoll(getAt(listRollAuto, Pz + 7))
- set DcCursMain to 1
- exit
- end if
- end if
- end if
- end if
- set Pz to Pz + 8
- end repeat
- set the castNum of sprite SprRollAuto to CastEfface
- set the locV of sprite SprRollAuto to 500
- end
-
- on SetDcRollPict
- global listRollPict
- if (listRollPict = list()) or voidp(listRollPict) then
- set listRollPict to list()
- exit
- end if
- FalsePisteTest(getAt(listRollPict, 1))
- FalsePisteTest(getAt(listRollPict, 2))
- set listRollPict to list()
- end
-
- on InitRollPict SpritePict, Champs, SpriteTitre, NameCastTitre, operande
- global listRollPict
- if (paramCount() <> 5) or (listRollPict = list()) then
- set listRollPict to list(0, 0, 0, 0)
- end if
- setAt(listRollPict, 1, SpritePict)
- setAt(listRollPict, 2, SpriteTitre)
- setAt(listRollPict, 3, the number of cast NameCastTitre)
- set Pz to 1
- repeat with AccuA = 1 to the number of words in Champs / 3
- set NumSpr to value(word Pz of Champs)
- add(listRollPict, the left of sprite NumSpr)
- add(listRollPict, the right of sprite NumSpr)
- add(listRollPict, the top of sprite NumSpr)
- add(listRollPict, the bottom of sprite NumSpr)
- add(listRollPict, the locH of sprite NumSpr)
- add(listRollPict, the locV of sprite NumSpr)
- add(listRollPict, the number of cast word Pz + 1 of Champs)
- add(listRollPict, the number of cast word Pz + 2 of Champs)
- set Pz to Pz + 3
- end repeat
- setAt(listRollPict, 4, (count(listRollPict) - 4) / 8)
- puppetSprite(SpritePict, 1)
- puppetSprite(SpriteTitre, 1)
- BalayRollPict()
- end
-
- on AjouteRollPict SpritePict, Champs, SpriteTitre, NameCastTitre
- InitRollPict(SpritePict, Champs, SpriteTitre, NameCastTitre, 1)
- end
-
- on BalayRollPict
- global listRollPict, DcCursMain, CastEfface
- if listRollPict = [] then
- exit
- end if
- set AccuX to the mouseH
- set AccuY to the mouseV
- set SpritePict to getAt(listRollPict, 1)
- set Pz to 5
- repeat with Compteur = 1 to getAt(listRollPict, 4)
- if getAt(listRollPict, Pz) < AccuX then
- if getAt(listRollPict, Pz + 1) > AccuX then
- if getAt(listRollPict, Pz + 2) < AccuY then
- if getAt(listRollPict, Pz + 3) > AccuY then
- set the castNum of sprite SpritePict to getAt(listRollPict, Pz + 6)
- set the locH of sprite SpritePict to getAt(listRollPict, Pz + 4)
- set the locV of sprite SpritePict to getAt(listRollPict, Pz + 5)
- set the castNum of sprite getAt(listRollPict, 2) to getAt(listRollPict, Pz + 7)
- set DcCursMain to 1
- exit
- end if
- end if
- end if
- end if
- set Pz to Pz + 8
- end repeat
- set the castNum of sprite SpritePict to CastEfface
- set the locV of sprite SpritePict to 500
- set the castNum of sprite getAt(listRollPict, 2) to getAt(listRollPict, 3)
- end
-
- on SetDcRollCast
- global listRollCast
- set listRollCast to list()
- end
-
- on InitRollCast Champs, operande
- global listRollCast
- if (paramCount() <> 2) or (listRollCast = list()) then
- set listRollCast to list(-1)
- end if
- add(listRollCast, word 1 of Champs)
- set Pz to 2
- repeat with AccuA = 1 to the number of words in Champs / 3
- add(listRollCast, the number of cast word Pz of Champs)
- add(listRollCast, value(word Pz + 1 of Champs))
- add(listRollCast, word Pz + 2 of Champs)
- set Pz to Pz + 3
- end repeat
- end
-
- on AjouteRollCast Champs
- InitRollCast(Champs, 1)
- end
-
- on BalayRollCast
- global listRollCast, DcCursMain
- if listRollCast = [] then
- exit
- end if
- set CastRoll to the mouseCast
- if CastRoll = -1 then
- setAt(listRollCast, 1, -1)
- if getAt(listRollCast, 2) <> "Nothing" then
- do(getAt(listRollCast, 2))
- end if
- exit
- end if
- set NcCastRoll to getAt(listRollCast, 1)
- setAt(listRollCast, 1, -2)
- set PosRoll to getOne(listRollCast, CastRoll)
- if PosRoll = 0 then
- if getAt(listRollCast, 2) <> "Nothing" then
- do(getAt(listRollCast, 2))
- end if
- exit
- end if
- setAt(listRollCast, 1, CastRoll)
- if (CastRoll = NcCastRoll) and (getAt(listRollCast, PosRoll + 1) = 0) then
- exit
- end if
- set NomMacro to getAt(listRollCast, PosRoll + 2)
- do(NomMacro)
- set DcCursMain to 1
- end
-